//
//  PictureTakeView.h
//  AnotherMediaTool
//
//  Created by fh on 2018/9/10.
//  Copyright © 2018年 fh. All rights reserved.
//


#import "GAKKIBaseView.h"
#import "CaptureButton.h"

/**
 闪光灯模式

 - PictureTakeViewFlashModeOff: 闪光灯关
 - PictureTakeViewFlashModeAuto: 闪光灯自动
 - PictureTakeViewFlashModeOn: 闪光灯开
 */
typedef NS_ENUM(NSInteger, PictureTakeViewFlashMode) {
    PictureTakeViewFlashModeOff = 0,
    PictureTakeViewFlashModeAuto = 1,
    PictureTakeViewFlashModeOn = 2
};

@interface PictureTakeView : GAKKIBaseView

/** 采集view */
@property (nonatomic, strong) UIView *preview;

/** 拍照事件回调 */
@property (nonatomic, copy) void(^takePictureButtonClickedBlock)(UIButton *button);
/** 返回事件回调 */
@property (nonatomic, copy) void(^backButtonClickedBlock)(UIButton *button);
/** 切换摄像头事件回调 */
@property (nonatomic, copy) void(^toggleButtonClickedBlock)(UIButton *button);
/** 闪光灯事件回调 */
@property (nonatomic, copy) void(^flashButtonClickedBlock)(UIButton *button, PictureTakeViewFlashMode flashMode);
/** 聚焦事件回调 */
@property (nonatomic, copy) void(^focusPreviewClickedBlock)(UITapGestureRecognizer *tapGestureRecognizer, CGPoint point);

/** 最小变焦值 */
@property (nonatomic, assign) CGFloat minScaleAndCropFactor;
/** 最大变焦值 */
@property (nonatomic, assign) CGFloat maxScaleAndCropFactor;

/** AVCaptureDevice方式变焦回调 */
@property (nonatomic, copy) void(^deviceZoomBlock)(CGFloat percentScale);

@end
